#pragma once
#include"Engine.h"

namespace Advanced2D{
	class Entity{
	private:
		bool visible;
		bool alive;
		int objectType;
		int lifetimeLength;
		Timer lifetimeTimer;

	public:
		Entity();
		virtual ~Entity() { };

		virtual void move() = 0;
		virtual void animate() = 0;
		virtual void draw() = 0;

		bool getVisible() { return visible; }
		void setVisible(bool value) { visible = value; }

		bool getAlive() { return alive; }
		void setAlive(bool value) { alive = value; }

		int getObjectType() { return objectType; }
		void setObjectType(int value) { objectType = value; }

		int getLifeTimeLength() { return lifetimeLength; }
		void setLifeTimeLength(int millisecond) { 
			lifetimeLength = millisecond; 
			lifetimeTimer.reset(); 
		}
		bool lifetimeExpried(){
			return lifetimeTimer.stopwatch(lifetimeLength);
		}
		
	};
};